package com.lr.domain;

import org.junit.Test;

import java.util.HashMap;

public class INet_hashmap {
    public static HashMap<String,INetSaler> hashmap= new HashMap();
    public static  HashMap<String,INetSaler> getHashmap()
    {   INetSaler iNetSaler=new INetSaler(123,"wk","123","lee_1","123");
        INetSaler iNetSaler_1=new INetSaler(123,"hk","123","lee_2","123");
        hashmap.put("w1",iNetSaler);
        hashmap.put("w2",iNetSaler_1);
        return hashmap;
    }
    @Test
   public void test()
    {   HashMap <String,INetSaler>hashMap=getHashmap();
        INetSaler iNetSaler_1=new INetSaler(123,"hk","123","lee_3","123");
        String key_get=null;
        for(String key:hashMap.keySet())
        {
            if(hashMap.get(key).getMg_name().equals("lee_1"))
            {key_get=key;
            break;}
           // System.out.println(key+" "+getHashmap().get(key).getMg_name());
        }
        hashmap.put(key_get,iNetSaler_1);
        for(String key:hashMap.keySet())
        {
           /* if(getHashmap().get(key).getMg_name().equals("lee_1"))
            {key_get=key;
                break;}*/
             System.out.println(key+" "+hashMap.get(key).getMg_name());
        }
    }
}
